﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="CertifiedHouseholdByDiaPhuong.ascx.vb" Inherits="Control_Reports_CertifiedHouseholdByDiaPhuong" %>

<script type='text/javascript'>
    function SetDownFile(aURL) {
        document.getElementById('expFile').src = aURL;
        return false;
    }

    function ajaxJquery() {
        $(function () {

            $(".Date").datepicker({ dateFormat: 'dd/mm/yy' });

            //Xử lý textbox chỉ cho nhập số
            $(".Numberic").live("keypress", function (event) {
                return isNumberKey(event);
            });
            $(".Numberic").live("keyup", function () {
                $(this).val(numberWithCommas($(this).val()));
            });

            //for enter search
            $(".SubjectTitle input, .SubjectTitle select").keypress(function (e) {
                if (e.keyCode == 13) {
                    $("#<%=btnSearch.ClientID()%>").click();
                    return false;
                }
            });           
        });
    }
    function CheckValid() {
        var _flag = true;
        // Check Date từ < đến
        var _fd = $("#<%= txtCertifieddateFrom.ClientID%>").val().trim();
        var _td = $("#<%= txtCertifieddateTo.ClientID%>").val().trim();
        if (_fd != "" && _td != "") {

        }
        return _flag;
    }
</script>
<asp:UpdatePanel ID="uplCertifiedhouseholdDiaPhuong" runat="server">
    <ContentTemplate>
        <div class="content_porletform">
            <div class="HeadTitle">
                <h3>DANH SÁCH ĐĂNG KÝ HỘ KINH DOANH THEO ĐỊA PHƯƠNG</h3>
            </div>
            <div class="box_contentform">
                <div class="box_scroll_grid">
                    <div style="clear:both;height:10px;">
                    </div>
                    <div id="pnlSearch" class="SubjectTitle">
                        <div id="search" class="BoxField">
                            <div class="DivRow">
                                <div class="Div-Left">
                                    <div class="DivLabelSearch">
                                        Địa phương:
                                    </div>
                                    <div class="DivTextBox">
                                        <asp:ListBox runat="server" ID="ddlDiaPhuong" class="TextAreaMultiple" Rows="15" SelectionMode="Multiple" />
                                    </div>
                                </div>
                                <div class="Div-Right">
                                    <div class="DivLabelSearch">
                                        Ngày cấp:
                                    </div>
                                    <div class="DivTextBox">
                                        <asp:TextBox ID="txtCertifieddateFrom" CssClass="TextBox Date" Width="87px" runat="server"
                                            Text="" />
                                        tới ngày:
                                        <asp:TextBox ID="txtCertifieddateTo" CssClass="TextBox Date" Width="87px" runat="server"
                                            Text="" />
                                    </div>
                                </div>
                                <div class="Div-Right">
                                    <div class="DivLabelSearch">
                                        Lĩnh vực:
                                    </div>
                                    <div class="DivTextBox">
                                        <asp:ListBox runat="server" ID="ddlLinhVuc" class="TextAreaMultiple" Rows="14" SelectionMode="Multiple" />
                                    </div>
                                </div>

                            </div>
                            <div style="clear: both; height: 10px">
                            </div>
                            <div class="DivRow">
                                <div class="DivLabelSearch">
                                    &nbsp;&nbsp;&nbsp;
                                </div>
                                <div class="DivTextBox">
                                    <asp:Button ID="btnSearch" runat="server" Text=" Tìm kiếm" CssClass="btn" OnClientClick="return CheckValid();" />
                                     <asp:Button ID="btnExportToExcel" runat="server" Text=" Xuất dữ liệu " CssClass="btn" Visible="false" />
                                    <asp:Button ID="btnReset" runat="server" Text="Hủy" CssClass="btn" />&nbsp;
                                </div>
                            </div>
                            <div style="clear: both; height: 10px">
                            </div>
                        </div>
                    </div>
                    <div style="clear: both; height: 10px">
                    </div>
                    <asp:GridView ID="grdShow" runat="server" AutoGenerateColumns="False" EmptyDataText="{Không có dữ liệu}"
                        AllowPaging="false" Width='100%' BorderWidth="1px" CssClass="GridBorder">
                        <Columns>
                            <asp:BoundField DataField='RowNum' HeaderText='STT'>
                                <ItemStyle Width='4%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='CertifiedCode' HeaderText='Số DKKD'>
                                <ItemStyle Width='8%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='CertifiedDate' DataFormatString='{0:dd/MM/yyyy}' HeaderText='Ngày cấp'>
                                <ItemStyle Width='8%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='Biz_VietName' HeaderText='Tên bảng hiệu '>
                                <ItemStyle Width='10%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='Ow_Name' HeaderText='Tên hộ '>
                                <ItemStyle Width='10%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='Ow_Sex' HeaderText='Giới tính'>
                                <ItemStyle Width='6%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='Ow_BirthDate' HeaderText='Ngày sinh'>
                                <ItemStyle Width='8%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='Ow_CardID' HeaderText='CMND'>
                                <ItemStyle Width='8%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='DiaPhuong' HeaderText='Địa phương'>
                                <ItemStyle Width='10%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='Biz_HeadOffice' HeaderText='Địa điểm KD'>
                                <ItemStyle Width='15%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='LinhVucKinhDoanh' HeaderText='Ngành nghề KD'>
                                <ItemStyle Width='20%' />
                            </asp:BoundField>
                            <asp:BoundField DataField='Biz_InvestCapital' HeaderText='Vốn' DataFormatString="{0:N}">
                                <ItemStyle Width='10%' />
                            </asp:BoundField>
                        </Columns>
                        <HeaderStyle Height="26px" HorizontalAlign="Center" CssClass="GridHeader" />
                        <RowStyle CssClass="GridRow" Height="23px" />
                        <AlternatingRowStyle CssClass="GridAlterRow" />
                        <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
                        <PagerSettings Mode="Numeric" PageButtonCount="2" />
                        <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
                    </asp:GridView>
                    <div style="clear: both; height: 5px">
                    </div>
                    <div>
                        <asp:Label ID="lblPage_Size" runat="server" Text="Số bản ghi trên trang:"></asp:Label>
                        <asp:DropDownList ID="drpPage_Size" runat="server" AutoPostBack="True" Width="70px"
                            CssClass="input_form">
                            <asp:ListItem Text="10" Value="10"></asp:ListItem>
                            <asp:ListItem Text="20" Value="20"></asp:ListItem>
                            <asp:ListItem Text="50" Value="50"></asp:ListItem>
                            <asp:ListItem Text="100" Value="100"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="lblTotal" runat="server"></asp:Label>
                    </div>
                    <div style="width: 100%">
                        <!--phan trang-->
                        <div id="results_resultsNavigationDiv" class="paginationEMP">
                            <ul>
                                <asp:LinkButton ID="lnkFirst" runat="server"></asp:LinkButton>
                                <asp:Repeater ID="rptPage" runat="server">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkTitle" CssClass="page_num" runat="server" OnClick="lnkTitle_Click"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:Repeater>
                                <asp:LinkButton ID="lnkLast" runat="server"></asp:LinkButton>
                            </ul>
                        </div>
                        <asp:HiddenField ID="hidCount" Value="0" runat="server" />
                        <asp:HiddenField ID="hidIndex_page" Value="0" runat="server" />
                        <asp:HiddenField ID="hidCur_Page" Value="1" runat="server" />
                    </div>
                    <div style='display: none'>
                        <asp:DropDownList ID="drpMessage" runat="server">
                            <asp:ListItem Text='Bạn có chắc chắn muốn xóa bản ghi này không?' Value='0'></asp:ListItem>
                            <asp:ListItem Text='Bạn có chắc chắn muốn xóa bản đã chọn?' Value='1'></asp:ListItem>
                            <asp:ListItem Text='Bạn phải chọn ít nhất một bản ghi.' Value='2'></asp:ListItem>
                        </asp:DropDownList>
                        <asp:HiddenField ID="hidID" Value="0" runat="server" />
   <asp:HiddenField ID="hidCurProvince" Value="0" runat="server" />
                        <iframe src="../../menu.htm" id="expFile"></iframe>
                    </div>
                </div>
            </div>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
